    <link href="<?= BASE_URI ?>slick/slick.css" rel="stylesheet"/>
<div id="postid" class="form-comment-wrap large-12 columns">
<div class="heads large-12 column">
<div class="headpost large-12 column">
	<ul class="inline-list">
		<li class="cht"><img src="<?= BASE_URI ?>img/icons/FinalStatusIcon.png">
			<a>
				Status Updates&nbsp;&nbsp;&nbsp;|
			</a>
		</li>
		<input type="file" accept = "image/*" id="fileUpload" name="profile_pic" style="visibility: hidden; width: 1px; height: 1px" multiple />
		<li class="cam"><img src="<?= BASE_URI ?>img/icons/FinalPhotoIcon.png">
			<a id="btnUpload">
				Upload Photo
			</a>
		</li>
		<li id="postLoading" class="right"><img src="<?= BASE_URI ?>img/loading.gif"></li>
	</ul>
</div>
</div>
	<div class="text-area large-12 columns">
		<textarea class="textarea-xpnd"  id="info" placeholder="What's in your mind?"></textarea>
		
	</div>
	<div id="out">
	</div>
	
	<div class="large-12 columns">
		<a id="btnPost" class="postbutton right radius button">Post</a>
	</div>
</div>


<div id="postContainer"> <!-- start of post container -->
<?php 

	foreach ($feeds as $value) 
	{
		switch($value->uft->feed_type)
		{ 
			case "status_update":
				$this->view->partial('feeds_template/status_update'); 
			break;
			case "make_review":
				$this->view->partial('feeds_template/make_review'); 
			break;
			case "commented_on":
				$this->view->partial('feeds_template/commented_on'); 
			break;
			case "wall_posts":
				$this->view->partial('feeds_template/wall_posts');
			break;
			case "events":
				$user_id = $this->session->get('user_id');
				$receivers = explode(',', $value->uft->receivers);
				if(in_array($user_id,$receivers))
				{
				$this->view->partial('feeds_template/events');
				}
			break;
		}
	} 

?>
</div> <!-- end of postContainer -->		
<div id="loadmore">
	<center><span>Loading more.. Please Wait</span><img src="<?=BASE_URI?>img/loading.gif"/> </center>
</div>		
<input id="page_no" type="hidden" value="<?= $page_no; ?>"/>

<script type="text/javascript" src="<?=BASE_URI?>js/feeds.js"></script>


<script type="text/javascript">
	$(document).ready(function(){

		$('.user-rating').jRating({
			type:'small',
			length : 5,
			decimalLength : 1,
			isDisabled : true
		});
	});


</script>


<script type="text/javascript">
	function updateEvent(event_id,status){
		var params = {};
		params.event_id = event_id;
		params.status = status;

		return $.ajax({
			url: URL + 'events/insertstatus',
			data : params,
			type: 'post',
			dataType: 'json'
		});
	}

	$(document).ready(function(){
		$(document).on('click','.btnComing',function(){
			var event_id = $(this).attr('event_id');
			var status = "coming";

			updateEvent(event_id,status).done(function(result){
				if(result.status == true)
				{
					var content = '<p id="coming_'+ event_id + '"class="people_coming" event_id = "'+ event_id + '">'+ result.total_coming + ' people coming</p>'
						$('#coming_' + event_id).html(content);
				}
			});
		});

		$(document).on('click','.btnMaybe',function(){
			var event_id = $(this).attr('event_id');
			var status = "maybe";

			updateEvent(event_id,status).done(function(result){
				if(result.status == true)
				{
					var content = '<p id="coming_'+ event_id + '"class="people_coming" event_id = "'+ event_id + '">'+ result.total_coming + ' people coming</p>'
						$('#coming_' + event_id).html(content);
				}
			});
		});
	});
</script>